|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sponsorpay.sdk.android.UrlBuilder
public class UrlBuilder
Contains utility methods to build URLs used to access the SponsorPay's back-end API.
Field Summary | |
---|---|
private static java.lang.String |
ANDROID_ID_KEY
The Android ID key for encoding the corresponding URL parameter. |
private static java.lang.String |
APPID_KEY
The App ID key for encoding the corresponding URL parameter. |
private static java.lang.String |
LANGUAGE_KEY
The default language setting key for encoding the corresponding URL parameter. |
private static java.lang.String |
OS_VERSION_KEY
The OS version key for encoding the corresponding URL parameter. |
private static java.lang.String |
PHONE_VERSION_KEY
The phone model key for encoding the corresponding URL parameter. |
private static java.lang.String |
SDK_INTERNAL_VERSION_KEY
The SDK internal version key for encoding the corresponding URL parameter. |
private static java.lang.String |
SDK_RELEASE_VERSION_KEY
The SDK release version key for encoding the corresponding URL parameter. |
private static java.lang.String |
UDID_KEY
The unique device ID (for url-encoding). |
private static java.lang.String |
URL_PARAM_SIGNATURE
Request signature parameter key. |
private static java.lang.String |
USERID_KEY
The user id key for encoding the corresponding URL parameter. |
private static java.lang.String |
WIFI_MAC_ADDRESS_KEY
The WiFi MAC Address ID key for encoding the corresponding URL parameter. |
Constructor Summary | |
---|---|
UrlBuilder()
|
Method Summary | |
---|---|
static java.lang.String |
buildUrl(java.lang.String resourceUrl,
HostInfo hostInfo,
java.lang.String[] extraKeys,
java.lang.String[] extraValues)
Builds a String URL with information gathered from the device and the specified parameters. |
static java.lang.String |
buildUrl(java.lang.String resourceUrl,
java.lang.String userId,
HostInfo hostInfo,
java.lang.String[] extraKeys,
java.lang.String[] extraValues)
Builds a String URL with information gathered from the device and the specified parameters. |
static java.lang.String |
buildUrl(java.lang.String resourceUrl,
java.lang.String userId,
HostInfo hostInfo,
java.lang.String[] extraKeys,
java.lang.String[] extraValues,
java.lang.String secretKey)
Builds a String URL with information gathered from the device and the specified parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String UDID_KEY
private static final java.lang.String USERID_KEY
private static final java.lang.String APPID_KEY
private static final java.lang.String OS_VERSION_KEY
private static final java.lang.String PHONE_VERSION_KEY
private static final java.lang.String LANGUAGE_KEY
private static final java.lang.String SDK_INTERNAL_VERSION_KEY
private static final java.lang.String SDK_RELEASE_VERSION_KEY
private static final java.lang.String ANDROID_ID_KEY
private static final java.lang.String WIFI_MAC_ADDRESS_KEY
private static final java.lang.String URL_PARAM_SIGNATURE
Constructor Detail |
---|
public UrlBuilder()
Method Detail |
---|
public static java.lang.String buildUrl(java.lang.String resourceUrl, java.lang.String userId, HostInfo hostInfo, java.lang.String[] extraKeys, java.lang.String[] extraValues)
resourceUrl
- The base for the URL to be built and returned, including schema and host.userId
- The user id parameter to encode in the result URL. It can be left to null and no user ID parameter key
will be included in the request parameters.hostInfo
- A HostInfo
instance used to retrieve data about the application id and the host
device.extraKeys
- An array of keys for extra parameters to encode in the result URL.extraValues
- An array of values corresponding to the provided extraKeys.
public static java.lang.String buildUrl(java.lang.String resourceUrl, HostInfo hostInfo, java.lang.String[] extraKeys, java.lang.String[] extraValues)
resourceUrl
- The base for the URL to be built and returned, including schema and host.hostInfo
- A HostInfo
instance used to retrieve data about the application id and the host
device.extraKeys
- An array of keys for extra parameters to encode in the result URL.extraValues
- An array of values corresponding to the provided extraKeys.
public static java.lang.String buildUrl(java.lang.String resourceUrl, java.lang.String userId, HostInfo hostInfo, java.lang.String[] extraKeys, java.lang.String[] extraValues, java.lang.String secretKey)
resourceUrl
- The base for the URL to be built and returned, including schema and host.userId
- The user id parameter to encode in the result URL. It can be left to null and no user ID parameter key
will be included in the request parameters.hostInfo
- A HostInfo
instance used to retrieve data about the application id and the host
device.extraKeys
- An array of keys for extra parameters to encode in the result URL.extraValues
- An array of values corresponding to the provided extraKeys.secretKey
- The publisher's secret token which will be used to sign the request. If left to null the request will
be sent unsigned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |